package com.qidian.tcba.dao;


import com.qidian.tcba.admin.model.dto.recordProcess.RecordProcessHistoryDTO;
import com.qidian.tcba.admin.model.entity.ParkLotRecordProcessHistory;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ParkLotRecordProcessHistoryMapper {
    int deleteByPrimaryKey(int id);

    int insert(ParkLotRecordProcessHistory record);

    ParkLotRecordProcessHistory selectByPrimaryKey(int id);

    List<ParkLotRecordProcessHistory> selectAll();

    int updateByPrimaryKey(ParkLotRecordProcessHistory record);

    /**
     * 获取流程履历列表
     * @param taskId
     * @param type
     * @return
     */
    List<RecordProcessHistoryDTO> getParkLotRecordHistoryAllList(int taskId,int type);

    /**
     * 通过备案任务id查找流程履历
     * @param recordTaskId
     * @return
     */
    ParkLotRecordProcessHistory findByRecordTaskId(@Param("recordTaskId") int recordTaskId,@Param("stage") int stage);

    /**
     * 通过所在环节和区县id查找流程履历
     * @param stage
     * @param districtId
     * @return
     */
    List<ParkLotRecordProcessHistory> findByStageAndDistrictId(int stage,int districtId);
}